/**
 *
 */
package com.magist.manage.enums;


import com.magist.core.enums.BaseEnum; import com.magist.core.util.TxtUtil;

/**
 * 沟通进度
 */
public enum CommDifficultyEnum implements BaseEnum {

    ONE("ONE","一星"),TWO("TWO","二星"),THREE("THREE","三星"),FOUR("FOUR","四星"),FIVE("FIVE","五星");

    private String code;

    private String desc;

    private CommDifficultyEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static CommDifficultyEnum getByCode(String code) {
        if (TxtUtil.isEmpty(code))
            return null;
        CommDifficultyEnum[] allEnums = CommDifficultyEnum.values();
        for (CommDifficultyEnum thisEnum : allEnums) {
            if (thisEnum.code.equals(code)) {
                return thisEnum;
            }
        }
        return null;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
